package com.exchange;

import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class BTBroadcastReceiver extends BroadcastReceiver {
	
	public void onReceive(Context context, Intent intent) {
		String action = intent.getAction();

		if (BluetoothDevice.ACTION_FOUND.equals(action)) {
			BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); 
			CardManger.getInstance().parseName(device.getName()); 
		
		} else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
			System.out.println("array:" + "BluetoothAdapter.ACTION_DISCOVERY_FINISHED");
			CardManger.getInstance().searchFinish();
		}
	}
}
